package com.commutersconnect;

import java.util.ArrayList;
import java.util.List;

import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.OverlayItem;
import android.graphics.drawable.Drawable;

public class ReportsOverlay extends ItemizedOverlay<OverlayItem> {

  private final List<OverlayItem> reports = new ArrayList<OverlayItem>();

  public ReportsOverlay(Drawable defaultMarker) {
    super(boundCenterBottom(defaultMarker));
  }

  public void addReport(OverlayItem overlay) {
    reports.add(overlay);
    populate();
  }

  @Override
  protected OverlayItem createItem(int i) {
    return reports.get(i);
  }

  @Override
  public int size() {
    return reports.size();
  }
}
